package com.sisreq.elementos;

import javax.swing.JFormattedTextField;

@SuppressWarnings("serial")
public class MyNumberField extends JFormattedTextField {

	public MyNumberField() {
		this.addKeyListener(new java.awt.event.KeyAdapter() {
			public void keyReleased(java.awt.event.KeyEvent evt) {
				MyNumberField.this.setText(MyNumberField.this.getText()
						.replaceAll("[^0-9]", ""));
			}
		});
	}

}
